package cn.blunce.weather.models;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import cn.blunce.weather.models.CityID;
import cn.blunce.weather.models.WeatherID;
import cn.blunce.weather.models.WeatherMessage;
import cn.blunce.weather.models.WeatherAQI;
import cn.blunce.weather.models.DailyForcast;
import cn.blunce.weather.models.AstroWeather;
import cn.blunce.weather.models.WeatherDaily;
import cn.blunce.weather.models.WeatherTmp;
import cn.blunce.weather.models.WeatherWind;
import cn.blunce.weather.models.HourlyForcast;
import cn.blunce.weather.models.WeatherNow;
import cn.blunce.weather.models.WeatherNowCond;
import cn.blunce.weather.models.WeatherSuggestion;
import cn.blunce.weather.models.Suggestion;

import cn.blunce.weather.models.CityIDDao;
import cn.blunce.weather.models.WeatherIDDao;
import cn.blunce.weather.models.WeatherMessageDao;
import cn.blunce.weather.models.WeatherAQIDao;
import cn.blunce.weather.models.DailyForcastDao;
import cn.blunce.weather.models.AstroWeatherDao;
import cn.blunce.weather.models.WeatherDailyDao;
import cn.blunce.weather.models.WeatherTmpDao;
import cn.blunce.weather.models.WeatherWindDao;
import cn.blunce.weather.models.HourlyForcastDao;
import cn.blunce.weather.models.WeatherNowDao;
import cn.blunce.weather.models.WeatherNowCondDao;
import cn.blunce.weather.models.WeatherSuggestionDao;
import cn.blunce.weather.models.SuggestionDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig cityIDDaoConfig;
    private final DaoConfig weatherIDDaoConfig;
    private final DaoConfig weatherMessageDaoConfig;
    private final DaoConfig weatherAQIDaoConfig;
    private final DaoConfig dailyForcastDaoConfig;
    private final DaoConfig astroWeatherDaoConfig;
    private final DaoConfig weatherDailyDaoConfig;
    private final DaoConfig weatherTmpDaoConfig;
    private final DaoConfig weatherWindDaoConfig;
    private final DaoConfig hourlyForcastDaoConfig;
    private final DaoConfig weatherNowDaoConfig;
    private final DaoConfig weatherNowCondDaoConfig;
    private final DaoConfig weatherSuggestionDaoConfig;
    private final DaoConfig suggestionDaoConfig;

    private final CityIDDao cityIDDao;
    private final WeatherIDDao weatherIDDao;
    private final WeatherMessageDao weatherMessageDao;
    private final WeatherAQIDao weatherAQIDao;
    private final DailyForcastDao dailyForcastDao;
    private final AstroWeatherDao astroWeatherDao;
    private final WeatherDailyDao weatherDailyDao;
    private final WeatherTmpDao weatherTmpDao;
    private final WeatherWindDao weatherWindDao;
    private final HourlyForcastDao hourlyForcastDao;
    private final WeatherNowDao weatherNowDao;
    private final WeatherNowCondDao weatherNowCondDao;
    private final WeatherSuggestionDao weatherSuggestionDao;
    private final SuggestionDao suggestionDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        cityIDDaoConfig = daoConfigMap.get(CityIDDao.class).clone();
        cityIDDaoConfig.initIdentityScope(type);

        weatherIDDaoConfig = daoConfigMap.get(WeatherIDDao.class).clone();
        weatherIDDaoConfig.initIdentityScope(type);

        weatherMessageDaoConfig = daoConfigMap.get(WeatherMessageDao.class).clone();
        weatherMessageDaoConfig.initIdentityScope(type);

        weatherAQIDaoConfig = daoConfigMap.get(WeatherAQIDao.class).clone();
        weatherAQIDaoConfig.initIdentityScope(type);

        dailyForcastDaoConfig = daoConfigMap.get(DailyForcastDao.class).clone();
        dailyForcastDaoConfig.initIdentityScope(type);

        astroWeatherDaoConfig = daoConfigMap.get(AstroWeatherDao.class).clone();
        astroWeatherDaoConfig.initIdentityScope(type);

        weatherDailyDaoConfig = daoConfigMap.get(WeatherDailyDao.class).clone();
        weatherDailyDaoConfig.initIdentityScope(type);

        weatherTmpDaoConfig = daoConfigMap.get(WeatherTmpDao.class).clone();
        weatherTmpDaoConfig.initIdentityScope(type);

        weatherWindDaoConfig = daoConfigMap.get(WeatherWindDao.class).clone();
        weatherWindDaoConfig.initIdentityScope(type);

        hourlyForcastDaoConfig = daoConfigMap.get(HourlyForcastDao.class).clone();
        hourlyForcastDaoConfig.initIdentityScope(type);

        weatherNowDaoConfig = daoConfigMap.get(WeatherNowDao.class).clone();
        weatherNowDaoConfig.initIdentityScope(type);

        weatherNowCondDaoConfig = daoConfigMap.get(WeatherNowCondDao.class).clone();
        weatherNowCondDaoConfig.initIdentityScope(type);

        weatherSuggestionDaoConfig = daoConfigMap.get(WeatherSuggestionDao.class).clone();
        weatherSuggestionDaoConfig.initIdentityScope(type);

        suggestionDaoConfig = daoConfigMap.get(SuggestionDao.class).clone();
        suggestionDaoConfig.initIdentityScope(type);

        cityIDDao = new CityIDDao(cityIDDaoConfig, this);
        weatherIDDao = new WeatherIDDao(weatherIDDaoConfig, this);
        weatherMessageDao = new WeatherMessageDao(weatherMessageDaoConfig, this);
        weatherAQIDao = new WeatherAQIDao(weatherAQIDaoConfig, this);
        dailyForcastDao = new DailyForcastDao(dailyForcastDaoConfig, this);
        astroWeatherDao = new AstroWeatherDao(astroWeatherDaoConfig, this);
        weatherDailyDao = new WeatherDailyDao(weatherDailyDaoConfig, this);
        weatherTmpDao = new WeatherTmpDao(weatherTmpDaoConfig, this);
        weatherWindDao = new WeatherWindDao(weatherWindDaoConfig, this);
        hourlyForcastDao = new HourlyForcastDao(hourlyForcastDaoConfig, this);
        weatherNowDao = new WeatherNowDao(weatherNowDaoConfig, this);
        weatherNowCondDao = new WeatherNowCondDao(weatherNowCondDaoConfig, this);
        weatherSuggestionDao = new WeatherSuggestionDao(weatherSuggestionDaoConfig, this);
        suggestionDao = new SuggestionDao(suggestionDaoConfig, this);

        registerDao(CityID.class, cityIDDao);
        registerDao(WeatherID.class, weatherIDDao);
        registerDao(WeatherMessage.class, weatherMessageDao);
        registerDao(WeatherAQI.class, weatherAQIDao);
        registerDao(DailyForcast.class, dailyForcastDao);
        registerDao(AstroWeather.class, astroWeatherDao);
        registerDao(WeatherDaily.class, weatherDailyDao);
        registerDao(WeatherTmp.class, weatherTmpDao);
        registerDao(WeatherWind.class, weatherWindDao);
        registerDao(HourlyForcast.class, hourlyForcastDao);
        registerDao(WeatherNow.class, weatherNowDao);
        registerDao(WeatherNowCond.class, weatherNowCondDao);
        registerDao(WeatherSuggestion.class, weatherSuggestionDao);
        registerDao(Suggestion.class, suggestionDao);
    }
    
    public void clear() {
        cityIDDaoConfig.getIdentityScope().clear();
        weatherIDDaoConfig.getIdentityScope().clear();
        weatherMessageDaoConfig.getIdentityScope().clear();
        weatherAQIDaoConfig.getIdentityScope().clear();
        dailyForcastDaoConfig.getIdentityScope().clear();
        astroWeatherDaoConfig.getIdentityScope().clear();
        weatherDailyDaoConfig.getIdentityScope().clear();
        weatherTmpDaoConfig.getIdentityScope().clear();
        weatherWindDaoConfig.getIdentityScope().clear();
        hourlyForcastDaoConfig.getIdentityScope().clear();
        weatherNowDaoConfig.getIdentityScope().clear();
        weatherNowCondDaoConfig.getIdentityScope().clear();
        weatherSuggestionDaoConfig.getIdentityScope().clear();
        suggestionDaoConfig.getIdentityScope().clear();
    }

    public CityIDDao getCityIDDao() {
        return cityIDDao;
    }

    public WeatherIDDao getWeatherIDDao() {
        return weatherIDDao;
    }

    public WeatherMessageDao getWeatherMessageDao() {
        return weatherMessageDao;
    }

    public WeatherAQIDao getWeatherAQIDao() {
        return weatherAQIDao;
    }

    public DailyForcastDao getDailyForcastDao() {
        return dailyForcastDao;
    }

    public AstroWeatherDao getAstroWeatherDao() {
        return astroWeatherDao;
    }

    public WeatherDailyDao getWeatherDailyDao() {
        return weatherDailyDao;
    }

    public WeatherTmpDao getWeatherTmpDao() {
        return weatherTmpDao;
    }

    public WeatherWindDao getWeatherWindDao() {
        return weatherWindDao;
    }

    public HourlyForcastDao getHourlyForcastDao() {
        return hourlyForcastDao;
    }

    public WeatherNowDao getWeatherNowDao() {
        return weatherNowDao;
    }

    public WeatherNowCondDao getWeatherNowCondDao() {
        return weatherNowCondDao;
    }

    public WeatherSuggestionDao getWeatherSuggestionDao() {
        return weatherSuggestionDao;
    }

    public SuggestionDao getSuggestionDao() {
        return suggestionDao;
    }

}
